import React, { useState } from 'react'

export default function App() {
    const [name, setname] = useState<string>("lzq")
  return (
    // 函数式对于ts 类型 有自带的隐式推断
    <div>函数式加class-{name.substring(0,1).toUpperCase()+name.substring(1)}
    <button onClick={()=>{
        setname("lvziqiao")
    }}>点击</button></div>
  )
}
